namespace Titarzhe;

class Service{

    protected _service;

    public  function _set(string name,object obj) -> int{
        if (typeof obj != "object") {
            throw new \Exception("type error!!");
        }
        let this->_service[name] = obj;
        return 1;
    } 

    public  function _get(string name){
        if (!isset this->_service[name]) {
            return 0;
        }
        return this->_service[name];
    }

    public  function _del(string name){
        let this->_service[name] = null;
    }

}